<?php
/**
 * PHP Class
 *
 * LICENSE
 *
 * Processing: bootstraps
 *
 * @category   	Joomzf Cms
 * @package    	App
 * @copyright  	Copyright vinanewstar.vn@gmail.com
 * @author		GiangNam (vinanewstar.vn@gmail.com)
 * @license    	GNU General Public License Version 2 or later (the "GPL")
 * @version     v1.0 May 27, 2012 - 5:40:03 PM
 */
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
	protected function _initDb(){
		$resources = $this->getOption('resources');
		$dbConfig  = $resources['db'];
		$db = Zend_Db::factory($dbConfig['adapter'],$dbConfig['params']);
		$db ->query("SET NAMES 'utf8'");
		$db ->query("SET CHARACTER SET 'utf8'");
		Zend_Db_Table::setDefaultAdapter($db);
		Zend_Registry::set('DBO',$db);
	}
	protected function _initLocation(){
		$locale = new Joomzf_Locale("vi_VN");
				
		Zend_Registry::set("Locale", $locale);
	}
// 	protected function _initLoadRouter(){
// 		$config = new Zend_Config_Ini(CONFIG_PATH . DS.'router.ini','zenjoo-router');
// 		$objRouter = new Zend_Controller_Router_Rewrite();
// 		$router = $objRouter->addConfig($config,'routers');//new Zend_Controller_Router_Route_Regex()
// 		$front = Zend_Controller_Front::getInstance();
// 		$front->setRouter($router);
// 	}
	
}